const mongoose = require('mongoose');
mongoose.connect('mongodb://127.0.0.1:27017/book-crud');
module.exports = function (onSuccess, onError) {
    mongoose.connection.on('open', onSuccess);
    mongoose.connection.on('error', onError);
}

